#!/bin/bash
# SHELL=/bin/bash
# PATH=/sbin:/bin:/usr/sbin:/usr/bin
# MAILTO=root

# crontab -e|-l|-r
# cat /var/log/cron

# * * * * * root /opt/GPTChat/XRchatgpt/airestart.sh >> /opt/GPTChat/logs/cron.log 2>&1

dt=$(date "+%Y-%m-%d %H:%M:%S")
# echo "$dt Status AI"
if [ -e /opt/GPTChat/XRchatgpt/aistatus ]; then 
    docker restart soVits; 
    rm -f /opt/GPTChat/XRchatgpt/aistatus; 
    echo "$dt Restarting AI";
fi